﻿#ifndef THREADCIN_H
#define THREADCIN_H
#include <qsemaphore.h>
#include <QThread>
#include <qwaitcondition.h>
#include "ThreadCin_global.h"
class ThreadClienNetWork;

class THREADCIN_EXPORT ThreadCin : public QThread {
Q_OBJECT;
	QString buff;

	// 输出信号
	QSemaphore semaphore;
	// 输出计数对象
	QVector<ThreadClienNetWork*>* netWrokTargetObjs = Q_NULLPTR;
	// 输出技术对象
	QVector<QString>* normalObs = Q_NULLPTR;
	// io 锁
	QMutex* ioMutex;
public:
	ThreadCin(QVector<ThreadClienNetWork*>* targetObjs
		, QMutex* ioMutex);
	ThreadCin(QVector<QString>* targetObjs
		, QMutex* ioMutex);
	~ThreadCin( );
protected:
	void run( ) override;
signals:
	void getCin(QString* str
		, QSemaphore* qSemaphore);
};
#endif // THREADCIN_H
